const events = require('events')

let EventEmitter = new events.EventEmitter();

EventEmitter.on('ps',(data)=>{
    console.log('接收到了这个广播:'+data.toString())
})


setTimeout(()=>{

    EventEmitter.emit('ps','发送的数据')
},5000)